import request from '@/utils/request'

// 查询
export function getTypeList(data) {
  return request({
    url: `/deviceType/page?limit=${data.limit}&page=${data.page}`,
    method: 'get'
  })
}

// 删除
export function deleteTypeList(data) {
  return request({
    url: `/deviceType/deleteOne/${data.deviceTypeId}`,
    method: 'post'
  })
}

// 批量删除
export function deleteTypeLists(data) {
  return request({
    url: `/deviceType/deleteList?ids%5B%5D=${data.item}`,
    method: 'post'
  })
}

// 更新
export function updateTypeList(data) {
  return request({
    url: '/deviceType/update',
    method: 'post',
    data
  })
}

// 新增
export function addTypeList(data) {
  return request({
    url: '/deviceType/insert',
    method: 'post',
    data
  })
}

// id,name查询
export function getIdandName(data) {
  return request({
    url: `/deviceType/getIdAndName/${data.moduleType}`,
    method: 'get'
  })
}

// 测试区域查询
export function getregionList(data) {
  return request({
    url: `/region/page?regionName=${data.regionName}`,
    method: 'get'
  })
}

// 测试基地查询
export function getbaseList(data) {
  return request({
    url: `/base/page?baseName=${data.baseName}`,
    method: 'get'
  })
}
